package com.ruoyi.wechat.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wechat.mapper.WxBannerMapper;
import com.ruoyi.wechat.domain.WxBanner;
import com.ruoyi.wechat.service.IWxBannerService;

/**
 * 广告Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-28
 */
@Service
public class WxBannerServiceImpl implements IWxBannerService 
{
    @Autowired
    private WxBannerMapper wxBannerMapper;

    /**
     * 查询广告
     * 
     * @param bannerId 广告主键
     * @return 广告
     */
    @Override
    public WxBanner selectWxBannerByBannerId(Long bannerId)
    {
        return wxBannerMapper.selectWxBannerByBannerId(bannerId);
    }

    /**
     * 查询广告列表
     * 
     * @param wxBanner 广告
     * @return 广告
     */
    @Override
    public List<WxBanner> selectWxBannerList(WxBanner wxBanner)
    {
        return wxBannerMapper.selectWxBannerList(wxBanner);
    }

    /**
     * 新增广告
     * 
     * @param wxBanner 广告
     * @return 结果
     */
    @Override
    public int insertWxBanner(WxBanner wxBanner)
    {
        return wxBannerMapper.insertWxBanner(wxBanner);
    }

    /**
     * 修改广告
     * 
     * @param wxBanner 广告
     * @return 结果
     */
    @Override
    public int updateWxBanner(WxBanner wxBanner)
    {
        return wxBannerMapper.updateWxBanner(wxBanner);
    }

    /**
     * 批量删除广告
     * 
     * @param bannerIds 需要删除的广告主键
     * @return 结果
     */
    @Override
    public int deleteWxBannerByBannerIds(Long[] bannerIds)
    {
        return wxBannerMapper.deleteWxBannerByBannerIds(bannerIds);
    }

    /**
     * 删除广告信息
     * 
     * @param bannerId 广告主键
     * @return 结果
     */
    @Override
    public int deleteWxBannerByBannerId(Long bannerId)
    {
        return wxBannerMapper.deleteWxBannerByBannerId(bannerId);
    }
}
